package com.lovo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lovo.bean.Supplier;
import com.lovo.mapper.SupplierMapper;
import com.lovo.service.ISupplierService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author lovo
 * @since 2022-09-17
 */
@Service
public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> implements ISupplierService {

    @Autowired
    SupplierMapper supplierMapper;
    @Override
    public Supplier login(String name, String pwd) {
        QueryWrapper<Supplier> qw = new QueryWrapper<>();
        qw.eq("u_name", name);
        qw.eq("u_pwd", pwd);
        Supplier supplier=supplierMapper.selectOne(qw);
        return supplier;
    }
}
